package com.xiao.springmvc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xiao.springmvc.entity.CompanyInfo;
import com.xiao.springmvc.jpa.CompanyDao;

@Service
public class CompanyService {

	@Autowired
	private CompanyDao companyDao;
	
	public List<CompanyInfo> findAll(){
		return companyDao.findAll();
	}
	
	public CompanyInfo findOneById(Long id){
		
		return companyDao.findById(id);
	}
}
